package com.lagou.domain;

import java.util.Date;

public class Employee {

    private Integer emp_id;        //分别对应员工表中的对应字段
    private String emp_name;
    private String dept_id;
    private String job_name;
    private Date join_Date;
    private String telephone;

    public Employee() {
    }

    public Employee(Integer emp_id, String emp_name, String dept_id, String job_name, Date join_Date, String telephone) {
        this.emp_id = emp_id;
        this.emp_name = emp_name;
        this.dept_id = dept_id;
        this.job_name = job_name;
        this.join_Date = join_Date;
        this.telephone = telephone;
    }

    public Integer getEmp_id() {
        return emp_id;
    }

    public void setEmp_id(Integer emp_id) {
        this.emp_id = emp_id;
    }

    public String getEmp_name() {
        return emp_name;
    }

    public void setEmp_name(String emp_name) {
        this.emp_name = emp_name;
    }

    public String getDept_id() {
        return dept_id;
    }

    public void setDept_id(String dept_id) {
        this.dept_id = dept_id;
    }

    public String getJob_name() {
        return job_name;
    }

    public void setJob_name(String job_name) {
        this.job_name = job_name;
    }

    public Date getJoin_Date() {
        return join_Date;
    }

    public void setJoin_Date(Date join_Date) {
        this.join_Date = join_Date;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "emp_id=" + emp_id +
                ", emp_name='" + emp_name + '\'' +
                ", dept_id='" + dept_id + '\'' +
                ", job_name='" + job_name + '\'' +
                ", join_Date=" + join_Date +
                ", telephone='" + telephone + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Employee employee = (Employee) o;

        if (!emp_id.equals(employee.emp_id)) return false;
        if (!emp_name.equals(employee.emp_name)) return false;
        if (!dept_id.equals(employee.dept_id)) return false;
        if (!job_name.equals(employee.job_name)) return false;
        if (!join_Date.equals(employee.join_Date)) return false;
        return telephone.equals(employee.telephone);
    }

    @Override
    public int hashCode() {
        int result = emp_id.hashCode();
        result = 31 * result + emp_name.hashCode();
        result = 31 * result + dept_id.hashCode();
        result = 31 * result + job_name.hashCode();
        result = 31 * result + join_Date.hashCode();
        result = 31 * result + telephone.hashCode();
        return result;
    }
}
